<template>
  <div>
    <nav>
        <img @click="onClose" src="../../components/imgs/icon-left.png" alt="">
        <p>提现记录</p>
    </nav>
    <div class = "sousuo">
       <!-- 手机号: <i-input v-model="phone" placeholder="请输入..." style="width: 300px"></i-input>
        <i-button type="primary" shape="circle" icon="ios-search" @click="getListInfo(0)"></i-button> -->
        <br>
       当前列表><span v-if="this.status>0">已处理</span><span v-else>未处理</span>
        <br>
        <i-button type="info" size="small"  @click="getListInfo(1)">已处理</i-button>
        <i-button type="info" size="small"  @click="getListInfo(0)">未处理</i-button>
    </div>
    <Row class="body">
       <i-col span="8">申请时间</i-col>
       <i-col span="8">提现金额</i-col>
       <i-col span="8">是否处理</i-col>
    </Row>

    <Row class="list" v-for="(item,index) of list" :key="index">
      <i-col span="8">{{item.createTime===''?'-':item.createTime}}</i-col>
      <i-col span="8">{{item.userMoney===''?'-':item.userMoney}}</i-col>
      <i-col span="8">{{item.status==0?'否':'是'}}</i-col>
    </Row>

      <div class="page">
        <Page :total="total" :page-size="pageSize" @on-change="handlePage"></Page>
      </div>

  </div>
</template>

<script>
import axios from "axios";
import { Modal } from "iview";
export default {
  name: "TxglList",
  data() {
    return {
      pageSize:10,
      page:1,
      total:0,
      list: [],
      modal6: false,
      loading: true,
      phone:'',//21312
      status:0,
    };
  },
  methods: {
    handlePage (res){
      console.log(res);
      var params = {
        "page": res,
        "pageSize": this.pageSize,
        "status": this.status, //0，未处理  1，已处理
        "userId": this.$store.state.user.userId
      };
      axios.post('/web/api/manager/shipLogList',params).then(this.getListInfoSucc)
    },
    getListInfo(status) {
      this.status = status;
      var params = {
        "page": this.page,
        "pageSize": this.pageSize,
        "status": this.status, //0，未处理  1，已处理
        "userId": this.$store.state.user.userId
      };
      axios.post("/web/api/manager/shipLogList",params).then(this.getListInfoSucc);
    },
    getListInfoSucc(res) {
      console.log("列表=====", res);
      this.list = res.data.date.list;
      this.total = res.data.date.total
    },
    onClose(){
      this.$router.back(-1)
    },
  },
  mounted() {
    this.getListInfo(0);
  }
};
</script>
<style lang="stylus" scoped>
bgBlue = linear-gradient(to right, #04befe, #4481eb);

nav {
    width: 100%;
    height: 50px;
    background: bgBlue;

    img {
        display: inline-block;
        float: left;
        width: 25px;
        height: 25px;
        margin: 12px 10px;
    }
    p {
        display: inline-block;
        width: 80%;
        float: left;
        font-size: 18px;
        color: #ffffff;
        text-align: center;
        line-height: 50px;
    }
}
.body {
  width: 100%;
  line-height: 3;
  font-size: 14px;
  color: #2680c4;
  background: #eff3fa;
  text-align: center;
}

.list {
  line-height: 3;
  font-size: 14px;
  text-align: center;
  color: #2680c4;
}

.sousuo {
  width: 100%;
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.page {
  width: 100%;
  margin-top: 2rem;
  text-align: center;
}

</style>

